package com.wz.jiangsu.bean.vo.show;

import lombok.Data;

import java.io.Serializable;

@Data
public class DealWithEvent implements Serializable {

    private Integer alertCount;
    private String alertSourceIp;
    private String alertSourceMac;
    private String alertSourcePort;
    private String alertTargetIp;
    private String alertTargetMac;
    private String alertTargetPort;
    private String dataSourceType;
    /**
     *  告警来源
     */
    private String equipment;
    private String eventCode;
    private String eventDescription;
    private String eventId;
    private String eventTitle;
    private String eventType;
    private String factory;
    private Long msgTime;
    private String msgType;
    private String operateResult;
    private String protocol;
    // 风险等级
    private Integer riskLevel;
    private Integer ruleGroup;
    private String sourceIp;
    private String alertDescription;
    private String threatName;
    private Long time;
    private String userName;
    private String uuid;
    private String status;
    private String alertScope;

    // 原始报文
    private String originLog;
    // cveId 信息
    private String cveId;
    // 处置建议
    private String suggestion;


    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"alertCount\":")
                .append(alertCount);

        sb.append(",\"alertSourceIp\":\"")
                .append(alertSourceIp).append('\"');

        sb.append(",\"alertSourceMac\":\"")
                .append(alertSourceMac).append('\"');

        sb.append(",\"alertSourcePort\":\"")
                .append(alertSourcePort).append('\"');

        sb.append(",\"alertTargetIp\":\"")
                .append(alertTargetIp).append('\"');

        sb.append(",\"alertTargetMac\":\"")
                .append(alertTargetMac).append('\"');

        sb.append(",\"alertTargetPort\":\"")
                .append(alertTargetPort).append('\"');

        sb.append(",\"dataSourceType\":\"")
                .append(dataSourceType).append('\"');

        sb.append(",\"equipment\":\"")
                .append(equipment).append('\"');

        sb.append(",\"eventCode\":\"")
                .append(eventCode).append('\"');

        sb.append(",\"eventDescription\":\"")
                .append(eventDescription).append('\"');

        sb.append(",\"eventId\":\"")
                .append(eventId).append('\"');

        sb.append(",\"eventTitle\":\"")
                .append(eventTitle).append('\"');

        sb.append(",\"eventType\":\"")
                .append(eventType).append('\"');

        sb.append(",\"factory\":\"")
                .append(factory).append('\"');

        sb.append(",\"msgTime\":")
                .append(msgTime);

        sb.append(",\"msgType\":\"")
                .append(msgType).append('\"');

        sb.append(",\"operateResult\":\"")
                .append(operateResult).append('\"');

        sb.append(",\"protocol\":\"")
                .append(protocol).append('\"');

        sb.append(",\"riskLevel\":")
                .append(riskLevel);

        sb.append(",\"ruleGroup\":")
                .append(ruleGroup);

        sb.append(",\"sourceIp\":\"")
                .append(sourceIp).append('\"');

        sb.append(",\"alertDescription\":\"")
                .append(alertDescription).append('\"');

        sb.append(",\"threatName\":\"")
                .append(threatName).append('\"');

        sb.append(",\"time\":")
                .append(time);

        sb.append(",\"userName\":\"")
                .append(userName).append('\"');

        sb.append(",\"uuid\":\"")
                .append(uuid).append('\"');

        sb.append(",\"status\":\"")
                .append(status).append('\"');

        sb.append(",\"alertScope\":\"")
                .append(alertScope).append('\"');

        sb.append(",\"originLog\":\"")
                .append(originLog).append('\"');

        sb.append(",\"cveId\":\"")
                .append(cveId).append('\"');

        sb.append(",\"suggestion\":\"")
                .append(suggestion).append('\"');

        sb.append('}');
        return sb.toString();
    }
}
